No, the z-index is related to but not the same as the height/depth dimension. I'm sure they've used the 'z' in its name to invoke this link in people's minds but it's not entirely correct.
There are only two dimensions because we're talking about 2D graphics here. The z-index defines the order in which these graphics are drawn. The greater the index, the later the element will be drawn and may thus be drawn over previously drawn elements. So elements can be 'stacked' upon one another giving the impression of depth. Hence why it's commonly referred to as the 'stack order'. The main difference is that the z-index uses arbitrary priorities (including negative numbers) while huddraw indices also function as the identifiers for each element.
In 3D graphics, we can place each element in a three-dimensional world so height/depth of each element is defined but when it comes to drawing, it is a matter of perspective (i.e. where are we standing and where are we looking at). This perspective is the field of view, represented by the viewing frustrum. It is typically shaped as a rectangular pyramid with its top and bottom cut off by two parallel planes (i.e. a frustrum of this pyramid).
These terms refer to completely different things. The planes that cut the view direction perpendicularly are called the near plane and far plane. Objects closer to the camera than the near plane or objects beyond the far plane are not drawn.



Reply With Quote

